package com.homework7;

import hfjava.Student;

import java.util.Scanner;

public class Test {
    public static void payoff(Person person){
        person.pay();
    }

    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        System.out.println("请输入老师基本工资");
        double baseSalary=input.nextDouble();
        System.out.println("请输入老师课时");
        int times=input.nextInt();
        System.out.println("请输入大学生支出");
        double burse=input.nextDouble();
        Person teacher=new Teacher(baseSalary,times);
        Person student=new CollogeStudents(burse);
        payoff(teacher);
        payoff(student);

    }
}
